<template>
    <div class="header">
        <div style="max-width:1200px;margin:auto;">
            <el-row>
                <el-col :span="12" style="text-align:left;">这是顶部黑色导航</el-col>
                <el-col :span="12" style="text-align:right;padding-right:0px;">
                    <span style="color:#fff;margin:0 15px;">{{ member.nickName}}</span>
                    <router-link to="/car/list">我的购物车</router-link>
                    <router-link to="/car/list" style="margin:0 15px;">我的订单</router-link>
                </el-col>
            </el-row>
        </div>
    </div>
</template>

<script>
export default {
    data() {
        return {
            member: {}
        }
    },
    created() {
        let _member = localStorage.getItem("2011A_member_info")
        if (_member == null) {
            this.$router.push('/login')
        }
        this.member = _member
    }
}
</script>

<style scoped>
.header {
    height: 30px;
    line-height: 35px;
    color: #fff;
    background: grey;
    font-size: 10px;
}
</style>